Nir motion detection system and method

ABSTRACT

A motion sensor for detection motion of humans is provided. The motion sensor contains a near infrared (NIR) low resolution image sensor that captures image frames in the near infrared spectrum and a sensor that detects the amount of visible light. In addition, a processor is connected to the visible light sensor and the NIR motion sensor. The processor is configured to receive the amount of visible light from the visible light sensor and the images from the NIR low resolution image sensor. The processor is further configured to compare the image frames to detect motion; the sensitivity of the detection of motion is determined by the amount of visible light detected by the visible light sensor. The output has two or modes based on the detection of motion by the processor.

FIELD

This disclosure relates to using low cost sensors to detect humanoccupancy of rooms. In particular, it relates to the use ofnear-infrared detection to detect motion.

BACKGROUND

Devices may require that they determine if a human is in the vicinity,such as occupying a room. Devices may include lights, or light controlswhich may turn off or operate at lower power when no one is in the roomin order to save power.

Some motion sensors contain passive infrared (PIR) sensors that detectthe infrared radiation emitted by occupants. This radiation typicallyhas a wavelength of about 15 micrometers (μm) to 1 mm (corresponding toa frequency range of about 20 THz to 300 GHz) and is generally referredto as Far Infrared Radiation (FIR).

PIR-based motion sensors may operate by detecting changes in the FIRspectrum caused by the movement of an occupant(s). This type of sensormay be used in many application areas, including lighting control andbuilding automation.

If a device turns off because it does not detect occupancy, but a personis still present, this can be annoying to the person. Alternatively, ifa sensor detects occupancy, such as by a heated object or air movements,lights may stay on or turn on unnecessarily.

BRIEF DESCRIPTION OF THE DRAWINGS

In drawings which illustrate by way of example only a preferredembodiment of the disclosure,

FIG. 1 is a schematic diagram of a motion sensor.

FIG. 2 is a schematic diagram showing connections within the motionsensor.

FIG. 3 is a schematic diagram of motion sensors in several rooms and ahallway.

SUMMARY

A motion sensor for detection motion of humans is provided. The motionsensor contains a multi-pixel image sensor that captures frames in thenear infrared spectrum. It may also capture some level of visible light.In an embodiment, the multi-pixel sensor is accompanied by a visiblelight sensing element. In another embodiment the multi-pixel sensor maydetermine the total light, near infrared and visible, entering the fieldof view of the sensor. In addition, a processor is connected to themulti-pixel image sensor. The processor is configured to receive theamount of visible light from the visible light sensor and the imagesfrom the NIR image sensor. The processor is further configured tocompare the image frames to detect motion; the sensitivity of thedetection of motion is determined by the amount of visible lightdetected by the visible light sensor. The output has two or modes basedon the detection of motion by the processor.

In an aspect, a method of detecting motion of humans involves receivingan amount of visible light detected using a visible light sensor andreceiving a plurality of frames from a near infrared low resolutionimage sensor that captures the frames in the near infrared spectrum. Themethod includes comparing two or more frames of the plurality of framesto detect motion using a processor, wherein the sensitivity of thedetection of motion is determined by the amount of visible lightdetected by the visible light sensor. The changing the mode of an outputis based on the detection of motion.

DETAILED DESCRIPTION OF ONE OR MORE EMBODIMENTS

This disclosure relates to a motion sensor 100 that detects changes onthe Near Infrared Spectrum (NIR). The NIR spectrum is typicallyconsidered light that has a wavelength between about 0.7 and 1 μm, whichcorresponds to a frequency of 428 THz to 200 THz. It represents thesegment of the Electromagnetic Spectrum adjacent to the visible lightspectrum. NIR has a longer wavelength than visible light.

Human occupants do not emit a meaningful amount of NIR themselves butthey do reflect NIR that may be incident on the human occupants, such asfrom natural (e.g. sunlight) or artificial light sources that containNIR.

NIR may be detected with detectors such as low resolution image sensorsor imagers, including many digital low resolution image sensors designedfor visible light. Filters for visible light may be applied so that alow resolution image sensor only can receive NIR. In contrast, passiveIR (PIR) sensors as referred to above, may require specializeddetectors.”

If only NIR or visible spectrum is used to detect motion, falsepositives may be a problem. Changes in background illumination levelscan be incorrectly classified as motion by a NIR or visible lightsensor. For example, a dramatic change in ambient light level, such asbright sunshine entering a window, can be incorrectly identified asmovement. By reducing the number of false positives, there may bereduced annoyance and inconvenience to users by having lights off whenthey are desired to be on. There may also be substantial energyefficiencies by reducing the amount of overall time that lights areactivated.

Processes may try to overcome false trips caused by changes inbackground illumination levels. These processes may communicate withsensors that capture visible light. Such processes may be used in videosurveillance and machine vision applications.

These processes may involve sophisticated statistical models that judgethe likelihood of change in a succession of images being caused bymotion or by changes in background illumination. Some techniques involveadvance knowledge of a reference set of features or of the backgroundand its characteristics, such as a scene, to “train” the process. Thetechniques used in these process may be applicable to an image sensorthat captures NIR. However, the processes that are directed toeffectively overcoming false positives usually require powerfulmicroprocessors that may be cost prohibitive for a device used in alighting control or building automation application.

In a present embodiment, successive frames from a low resolution imagesensor or imager may be compared or subtracted from one another, leavingonly the moving object. Features may be extracted from the difference inframes of training sets to train a machine learning classifier.

One measure of detection accuracy is the F-Score. The F-Score is theharmonic average of the precision and recall of a detection system. Forthe purposes of defining an F-Score, precision may be defined as truepositives/(true positives+false positives). Similarly, recall may bedefined as true positives/(true positives+false negatives).

Using precision and recall defined in this manner, F-Score may bedetermined by

F score=2*precision*recall/(precision+recall).

The motion sensor 100 may include an NIR sensor 110. The NIR sensor mayinclude multiple elements or pixels arranged in a grid 112 to form amulti-pixel sensor. The number of pixels for a field of view may beselected such that the image capture does not capture enough detail tocause privacy concerns. These privacy concerns may include identifyingspecific information, capturing text on documents, reading computerscreens or capturing identifying characteristics of a person. The NIRsensor may include or work in conjunction with a source of IRillumination such as one or more IR LEDs. The source of IR illumination,such as the one or more IR LEDS, may be integrated with or separate fromthe motion sensor 100. The motion sensor 100 may also include a visiblelight sensor 120 or daylight sensor. The visible light sensor 120 may bea single element/pixel sensor separate from the NIR sensor 110, or themulti-pixel sensor may determine the total light, near infrared andvisible, entering the field of view of the sensor. The daylight sensormay also be the collective sum of readings from more than oneelement/pixel. The motion sensor 100 may also include a processor 130,such as a micro-controller, containing or including a low costmicroprocessor. The motion sensor may be connected to, be integratedwith an output 140, such as a light or light system. The output may havetwo or more modes such as on/off, low/medium/high output levels, or anoutput gradient. The motion sensor may in addition or alternatively,connected to a control system and communicate the status of the motionsensor to the control system.

The motion sensor 100 may also include or receive signals from areal-time clock such that the processor can determine and base itsactions on the time. The real-time clock may be integrated with themotion sensor 100. The real-time clock may be accessible over a networkconnected to the motion sensor 100.

The motion sensor 100 may use the readings from the image sensor and thevisible light sensor to determine if there is motion. Themicro-processor may use the readings to generate an output or change itsoutput, such as activating a light, if motion is detected. The visiblelight sensor may detect visible light levels in the vicinity of thesensor, such as from ambient sunlight entering from windows, orartificial lights. The visible light sensor 120 may detect the absolutevalue of the brightness of the visible light. The visible light sensor120 may detect changes in the brightness of visible light.

The sensor may factor environmental conditions into the decision tochange the state of the sensor. For example, the sensor may choose tosuspend a classification decision during changes in ambient light abovea certain threshold. A different threshold value can be applied tochanges in ambient light for a given direction (increasing or decreasingambient light).

The absolute value and the change of value in daylight readings over aspecified time frame may be used in several ways. For example, motiondetection may only be enabled once the ambient daylight readings havestabilized, such as when the change in value of visible light is below adetermined value for a period of time. As another example is for theprocessor to compare daylight sensor changes with changes in the NIRsensor. In this way, even a simple daylight sensor may be used incombination with the NIR sensor.

The detection of a rapid change in daylight readings may dampen thesensitivity of the sensor's response to changes detected by the NIRsystem over the same time frame. In this way, a dramatic change indaylight may reduce the sensitivity of the NIR sensor.

A rapid change in daylight readings may suspend the processing of theNIR readings over the same time period as the rapid change in thedaylight readings.

The overall visible light level may be used to load different tuningparameters that make the sensor more or less sensitive to motiondetected in NIR. For example, a sensitivity threshold may be adjustedbased on the daylight reading or change in daylight readings. Athreshold may be multiplied by a number less than 1 based on the currentdaylight sensor reading. For example, a low confidence detection ofmotion or a small amount of motion may be less important when thedaylight sensor detects bright ambient light than a similar detection ofmotion when there is less ambient light. The sensitivity for motion maybe reduced when the system is more likely to have false positives.

The change in visible daylight readings or the absolute level of visibledaylight readings may cause the sensor to process a higher number offrames before making a decision on changes in NIR. For example, ifimages are captured at a specific frame rate, such as 12 to 15 framesper second, instead of processing the changes over 2 frames, a changeover 4 frames may be determined. In this way, one or two frames ofextraneous data may be ignored.

While often high responsiveness to detected changes is desirable, ifthere are changes that are likely to be false positives, a slowerresponse rate may be beneficial. Increasing the number of frames incircumstances determined by the daylight sensor may reduce falsepositives although responsiveness may be reduced. The number of framesto compare before determining if motion has occurred may be dynamicallydetermined based on the daylight sensor and/or the noise levels of thedetected frames. In this way, the system may be self-optimized to reducefalse positives.

The number of frames to compare may also depend on the location andhistory of detection of motion. For example, in a low traffic location,a motion sensor may wait and compare additional frames beforedetermining motion has occurred while in a high traffic location, thelow latency may be preferred and there is a lower risk of falsepositives. Considering additional frames may increase accuracy but is atrade off with latency.

Determining motion may be more than just a comparison of subsequentframes or performing noise reduction processes of individual frames.

With reference to FIG. 3, motion sensors 100A, 100B, 100C and 100D maybe placed in rooms 215, 220 of a building, including in a hallway 205.Each motion sensor may have a region or space within which it can detectmotion. The detection of motion may be affected, as described elsewherein this document by ambient light, such as entering through windows 210a, 210 b, and 210 c.

The sensitivity of the NIR motion sensor may also change depending onthe time of day. For example, a first sensitivity may be used duringoffice hours, a second sensitivity for after hours while a thirdsensitivity may be used overnight.

The use of the daylight sensor in conjunction with the NIR sensor doesnot preclude the use of additional techniques to improve the detectionof movement. For example, analysis may be done on the number and/orarrangement of NIR pixels that detect a change in level to assess thelikelihood that the change in level was caused by motion. Othertechniques can include background modelling or training the algorithmwith reference images gathered onsite or pre-loaded offline.

A machine learning process can be used to classify images obtained fromthe NIR sensor into categories or classifications. Rather than theactual images being used for training, subtracted images may be preparedby subtracting an image from the NIR low resolution image sensor from asubsequent image to identify differences between the images. The machinelearning process may be a module, library on a processor or separatehardware that performs image motion classification.

These categories or classifications may include an indication ofvacancy, major motion or minor motion. Additional categories orclassifications may be included. The machine learning process may betrained using images, sets of images or video offline to classify theinputs into one or more of the categories. Features such as intensity ofmotion, distribution of the motion, and fade of the motion in variousdirections may be incorporated into the training. The features derivedfrom the training data may include spatial or frequency of the inputs,or time domain analysis of the training data. The features also includeinput from a daylight/ambient light sensor and the time of day. Thefeatures may also include other sensors of a motion sensor. One or moretrained classifiers may then be exported to or incorporated into amotion sensor.

Misclassifications may have different levels of severity. This isparticularly the instance for a motion sensor controlling a light as anoutput. In some instances, such as if a room is occupied, it may be veryundesirable, i.e. very severe, for the light to be put in an offmode—e.g. turn off. This would be considered a false negative. On theother hand, a light remaining in an ‘on’ mode for a period of time aftera person has left a room may be have a low severity—a false positive.The degree of severity in different scenarios may depend on the locationand position of the motion sensor. A motion sensor 100A operating alight in a hall 205 may have different requirements than a motion sensoroperating a light in a board room. Since the location and environmentaloperating conditions of a given sensor may not be known prior toinstallation, the motion sensor is equipped with a mechanism adapt theclassification algorithm based on site condition. It can dynamicallyadjust the classification model based on time of day, location andcurrent light level. The motion sensor may be biased to place morepenalty on classification errors that are considered more severe.

The process of classifying inputs from the NIR sensor and daylightsensor may change depending on the degree of ambient light for a motionsensor connected to a light as well as the current light level output orlocation of the light. For example, a false positive while room lightson may result in lights staying on longer than needed after the occupanthas left the room, delaying the vacancy state. A false positive whileroom lights are off may result in lights changing state from off to onwhen there is no occupant. A false negative while room lights are on mayresult in lights change state from on to off while there is an occupantin the room. A false negative while room lights are off may result inincreased detection latency while a person is in the field of view ofthe sensor, delaying the turning on of the lights.

Once trained, a confidence for each classification/category may bedetermined. During operation, the classifier may be fed features, suchas images, or such as subtracted images, from the NIR low resolutionimage sensor, visible light levels and changes, and the time of day. Theclassifier may generate a confidence of various classifications,including motion. The classification may be performed by the processorusing an input image detected by the NIR sensor and from the daylightsensor. Based on the confidence in each category, adjustments may bemade to an output from the motion sensor. The adjustment to an outputfrom the motion sensor may be changing a light level of a lightconnected to the motion sensor, or changing a timer duration. A timerduration affects how long an output remains in a state after motion isdetected, for example, how long a light remains on after motion isdetected. An output may be activated for longer if the confidence ofmotion being detected is higher. For example if probability an inputbeing actual motion rather than a false positive, is low, a light may beturned on for a shorter period of time. Motion often has a pattern suchas starting on an edge of a field of view, continuing for a period oftime and often leaving the field of view at some later point. Motionthat does not follow this pattern may be considered of lower probabilityof actual motion and more likely to be a false positive. A series ofpotential motion events that do not fit a typical pattern may berejected or sensitivity parameters adjusted to avoid false positivesthat result in lights or other outputs being activated.

The classification process may adjust sensitivity parameters based onchanges in daylight detected using the ambient light sensor. Theclassification process may adjust penalties based on the spatiallocation of a given sensor. This allows the sensor to perform atrade-off at run time, during operations, to find a better optimumbetween classification errors. For example, a motion sensor 100B in aroom 215 in the corner of two windows 210 a, 210 b may be biased towardsfewer false positives, whereas a motion sensor 100A in a hallway may bebiased towards fewer false negatives. In this way, the motion sensor inthe hallway may be less likely to turn off even if no motion is detectedin the hallway. The motion sensor may be pre-configured prior toinstallation, updated or configured at the time of installation orconfigured after installation with its location, or an operating modedepending on its desired operation. The motion sensor may be updated orconfigured by modifying configuration switches or variables or replacingor updating software running on the motion sensor.

The sensor may self-configure or self discover aspects of itssurroundings after installation. For example, the sensor may identify orclassify the presence of windows, the type of room it is operating orother pertinent physical conditions as a means to improve accuracy. Thesensor may examine the captured frames and determine the presence andthe location of one or more windows. Windows may represent a source ofbackground illumination. Identifying and classifying windows in thefield of view may be done by comparing intensity values over a timeframe. Changes in intensity may vary significantly more for a windowthan for a wall, desk or other features in the field of view. Athreshold may be fixed for the variance in intensity above which isclassified as a window. This threshold may be pre-determined or modifiedif it is determined to be too sensitive (e.g. a majority of the frame ismisidentified as a window). One or more regions of interest within theframe may be identified based on the location of the window. A lower, ordifferent, sensitivity value may be applied to the window portions ofthe frame than to other regions of the frame. In this way, changesoriginating within the window region of the frame may be given lessimportance than change within other portions of the frame. Such aprocess may similarly detect an independently controlled light, such asa desk light, that is in or near the field of view.

The sensor may classify its location based on observed patterns ofmotion. For example, if the detected motion typically originates at oneside of the field of view, and typically passes through the field ofview and leaves another side of the field of view, or vice versa, thesensor may classify itself as being positioned in a hallway, and applydifferent processes (such as lower latency and may be biased towardsfewer false negatives as described above). If the detected motion tendsto stay within the field of view for extended periods, the sensor mayclassify itself as being positioned in an office or boardroom.

For a motion sensor that utilizes a trained classifier, the motionsensor may have multiple classifiers available and select or switchbetween classifiers. The motion sensor may change classifiers ifanomalies are detected, such as false positives. The motion sensor maychange classifiers based on daylight sensor values, location or time.For example, a motion sensor may have a first classifier that is usedduring work hours and a second classifier that is used the rest of thetime. In this way, the motion sensor can take advantage of a trainedclassifier in multiple circumstances without the particular devicerequiring re-training or additional training data.

By doing so, each motion sensor may factor in ambient light levels asdetected by the ambient light sensor, time of day, location in thebuilding and traffic patterns to determine settings that reduce theobserved frequency of false positives and false negatives.

The motion sensor may divide the image from the NIR low resolution imagesensor into multiple regions and place more or less sensitivity oncertain parts of the frame. For example, the pixels around the perimeterof the frame may be weighted differently than those in the center of theframe. One or more regions may receive less weight if anomalies aredetected to a greater extent in the one or more regions. For example,the NIR low resolution image sensor of a motion sensor 100C in a room220 may capture in the corner of the frame movement in an adjoininghallway 205. The region of the frame associated with the hallway may begiven less weight when considering if the room has motion since motionin the hallway is not indicative of motion in the room.

The motion sensor may examine its own history of classificationdecisions to perform a self-assessment of accuracy. The history ofclassifications may be stored in digital memory associated with themotion sensor and connected with the processor.

The duration of this history may span a time interval that is greaterthan the decision-making latency. For example, the detection of motion,when lights are off, may be done within a latency of 50 ms to besuitable for a particular application. For a NIR low resolution imagesensor that captures images at 60 frames per second, the process has 3frames to decide whether to classify a motion and activate the lights.The history of classification decisions may be longer than the threeframes and preferably is at least ten times the latency, such asincluding 100 frames or more.

The motion sensor may examine anomalies in the sequence of historicdecisions to determine if there is a need to adjust classificationparameters. For example, if the motion sensor detects motion afterexamining frames 1 to 3 but then does not detect motion for the next 100frames, the algorithm may deem this scenario as an anomaly. This is doneby comparing the historic decision sequence to typical motion sequences.For example, a detection of motion is typically followed by some levelof additional minor or major motion.

In this way, the motion sensor may improve its accuracy over time bydetecting these anomalies in the historic pattern of classifications.Anomalies in the classification history may be classified as falsepositives or false negatives. Revisions to the global detectionparameters can be made in accordance with the anatomies detected toreduce the future probability of false positives and false negatives.For example, the sensitivity of certain pixels or regions in the framemay be adjusted to increase or decrease the response of the detectionalgorithm. As discussed above, this may arise from a window, aseparately controlled light, or something like a mirror or shiny objectthat does not represent light levels or motion that relate to the roomor field of view as a whole.

The determination of an anomaly may result in the algorithm learning ormodifying itself after installation, during run time and making changesto classification parameters, detection sensitivity or other parameters.The sensor can also examine the time difference between shutting thelights off and new detection of motion as part of a mechanism to reducefalse negatives. If the lights are turned off and motion is detected avery short time later, then this may indicate that the lights should nothave been turned off. As discussed above, this may result in adjustmentsto the sensitivity and to the timer duration.

The identification of an anomaly may result in the motion sensor makingchanges to the classification parameters, detection sensitivity or otherparameters.

Various embodiments of the present disclosure having been thus describedin detail by way of example, it will be apparent to those skilled in theart that variations and modifications may be made without departing fromthe disclosure. The disclosure includes all such variations andmodifications as fall within the scope of the appended claims.

The system and method disclosed herein may be implemented via one ormore components, systems, servers, appliances, other subcomponents, ordistributed between such elements. When implemented as a system, suchsystems may include an/or involve, inter alia, components such assoftware modules, general-purpose CPU, RAM, etc. found ingeneral-purpose computers. In implementations where the innovationsreside on a server, such a server may include or involve components suchas CPU, RAM, etc., such as those found in general-purpose computers.

Additionally, the system and method herein may be achieved viaimplementations with disparate or entirely different software, hardwareand/or firmware components, beyond that set forth above. With regard tosuch other components (e.g., software, processing components, etc.)and/or computer-readable media associated with or embodying the presentinventions, for example, aspects of the innovations herein may beimplemented consistent with numerous general purpose or special purposecomputing systems or configurations. Various exemplary computingsystems, environments, and/or configurations that may be suitable foruse with the innovations herein may include, but are not limited to:software or other components within or embodied on personal computers,servers or server computing devices such as routing/connectivitycomponents, hand-held or laptop devices, multiprocessor systems,microprocessor-based systems, set top boxes, consumer electronicdevices, network PCs, other existing computer platforms, distributedcomputing environments that include one or more of the above systems ordevices, etc.

In some instances, aspects of the system and method may be achieved viaor performed by logic and/or logic instructions including programmodules, executed in association with such components or circuitry, forexample. In general, program modules may include routines, programs,objects, components, data structures, etc. that perform particular tasksor implement particular instructions herein. The inventions may also bepracticed in the context of distributed software, computer, or circuitsettings where circuitry is connected via communication buses, circuitryor links. In distributed settings, control/instructions may occur fromboth local and remote computer storage media including memory storagedevices.

The software, circuitry and components herein may also include and/orutilize one or more type of computer readable media. Computer readablemedia can be any available media that is resident on, associable with,or can be accessed by such circuits and/or computing components. By wayof example, and not limitation, computer readable media may comprisecomputer storage media and communication media. Computer storage mediaincludes volatile and nonvolatile, removable and non-removable mediaimplemented in any method or technology for storage of information suchas computer readable instructions, data structures, program modules orother data. Computer storage media includes, but is not limited to, RAM,ROM, EEPROM, flash memory or other memory technology, CD-ROM, digitalversatile disks (DVD) or other optical storage, magnetic tape, magneticdisk storage or other magnetic storage devices, or any other mediumwhich can be used to store the desired information and can accessed bycomputing component. Communication media may comprise computer readableinstructions, data structures, program modules and/or other components.Further, communication media may include wired media such as a wirednetwork or direct-wired connection, however no media of any such typeherein includes transitory media. Combinations of the any of the aboveare also included within the scope of computer readable media.

In the present description, the terms component, module, device, etc.may refer to any type of logical or functional software elements,circuits, blocks and/or processes that may be implemented in a varietyof ways. For example, the functions of various circuits and/or blockscan be combined with one another into any other number of modules. Eachmodule may even be implemented as a software program stored on atangible memory (e.g., random access memory, read only memory, CD-ROMmemory, hard disk drive, etc.) to be read by a central processing unitto implement the functions of the innovations herein. Or, the modulescan comprise programming instructions transmitted to a general purposecomputer or to processing/graphics hardware via a transmission carrierwave. Also, the modules can be implemented as hardware logic circuitryimplementing the functions encompassed by the innovations herein.Finally, the modules can be implemented using special purposeinstructions (SIMD instructions), field programmable logic arrays or anymix thereof which provides the desired level performance and cost.

As disclosed herein, features consistent with the disclosure may beimplemented via computer-hardware, software and/or firmware. Forexample, the systems and methods disclosed herein may be embodied invarious forms including, for example, a data processor, such as acomputer that also includes a database, digital electronic circuitry,firmware, software, or in combinations of them. Further, while some ofthe disclosed implementations describe specific hardware components,systems and methods consistent with the innovations herein may beimplemented with any combination of hardware, software and/or firmware.Moreover, the above-noted features and other aspects and principles ofthe innovations herein may be implemented in various environments. Suchenvironments and related applications may be specially constructed forperforming the various routines, processes and/or operations accordingto the invention or they may include a general-purpose computer orcomputing platform selectively activated or reconfigured by code toprovide the necessary functionality. The processes disclosed herein arenot inherently related to any particular computer, network,architecture, environment, or other apparatus, and may be implemented bya suitable combination of hardware, software, and/or firmware. Forexample, various general-purpose machines may be used with programswritten in accordance with teachings of the invention, or it may be moreconvenient to construct a specialized apparatus or system to perform therequired methods and techniques.

Aspects of the method and system described herein, such as the logic,may also be implemented as functionality programmed into any of avariety of circuitry, including programmable logic devices (“PLDs”),such as field programmable gate arrays (“FPGAs”), programmable arraylogic (“PAL”) devices, electrically programmable logic and memorydevices and standard cell-based devices, as well as application specificintegrated circuits. Some other possibilities for implementing aspectsinclude: memory devices, microcontrollers with memory (such as EEPROM),embedded microprocessors, firmware, software, etc. Furthermore, aspectsmay be embodied in microprocessors having software-based circuitemulation, discrete logic (sequential and combinatorial), customdevices, fuzzy (neural) logic, quantum devices, and hybrids of any ofthe above device types. The underlying device technologies may beprovided in a variety of component types, e.g., metal-oxidesemiconductor field-effect transistor (“MOSFET”) technologies likecomplementary metal-oxide semiconductor (“CMOS”), bipolar technologieslike emitter-coupled logic (“ECL”), polymer technologies (e.g.,silicon-conjugated polymer and metal-conjugated polymer-metalstructures), mixed analog and digital, and so on.

It should also be noted that the various logic and/or functionsdisclosed herein may be enabled using any number of combinations ofhardware, firmware, and/or as data and/or instructions embodied invarious machine-readable or computer-readable media, in terms of theirbehavioral, register transfer, logic component, and/or othercharacteristics. Computer-readable media in which such formatted dataand/or instructions may be embodied include, but are not limited to,non-volatile storage media in various forms (e.g., optical, magnetic orsemiconductor storage media) though again does not include transitorymedia. Unless the context clearly requires otherwise, throughout thedescription, the words “comprise,” “comprising,” and the like are to beconstrued in an inclusive sense as opposed to an exclusive or exhaustivesense; that is to say, in a sense of “including, but not limited to.”Words using the singular or plural number also include the plural orsingular number respectively. Additionally, the words “herein,”“hereunder,” “above,” “below,” and words of similar import refer to thisapplication as a whole and not to any particular portions of thisapplication. When the word “or” is used in reference to a list of two ormore items, that word covers all of the following interpretations of theword: any of the items in the list, all of the items in the list and anycombination of the items in the list.

Although certain presently preferred implementations of the inventionhave been specifically described herein, it will be apparent to thoseskilled in the art to which the invention pertains that variations andmodifications of the various implementations shown and described hereinmay be made without departing from the spirit and scope of theinvention. Accordingly, it is intended that the invention be limitedonly to the extent required by the applicable rules of law.

While the foregoing has been with reference to a particular embodimentof the disclosure, it will be appreciated by those skilled in the artthat changes in this embodiment may be made without departing from theprinciples and spirit of the disclosure, the scope of which is definedby the appended claims

What is claimed is:
 1. A motion sensor for detection motion of humanscomprising: a visible light sensor that detects an amount of visiblelight; a source of near infrared (NIR) illumination; a NIR lowresolution image sensor that captures image frames in the near infraredspectrum illuminated by the source of NIR illumination; a processorconnected to the visible light sensor and the NIR low resolution imagesensor that receives the amount of visible light from the visible lightsensor and the image frames from the NIR low resolution image sensor,wherein the processor is configured to compare the image frames todetect motion and the sensitivity of the detection of motion isdetermined by the amount of visible light detected by the visible lightsensor; an output that has two or modes based on the detection of motionby the processor.
 2. The motion sensor of claim 0, wherein the NIR lowresolution image sensor and the visible light sensor are the same sensorthat captures both NIR and visible light.
 3. The motion sensor of claim0, wherein the sensitivity of the detection of motion is reduced when ahigh amount of visible light is detected.
 4. The motion sensor of claim0, wherein the sensitivity of the detection of motion is reduced whenthe amount of visible light detected changes rapidly.
 5. The motionsensor of claim 0 further comprising one or more image motionclassifiers configured to compare the image frames to detect the motion.6. The motion sensor of claim 0, wherein the one more image motionclassifiers are trained on images, set of images or video offlineclassified into the two or more outputs modes for the output.
 7. Themotion sensor of claim 0, wherein the processor uses one of the one ormore image motion classifiers based on the amount of visible lightdetected, the location of the motion sensor, or the time of day.
 8. Themotion sensor of claim 1, wherein the two or modes of the output includea duration parameter of how long the output remains on after a motion isdetected.
 9. The motion sensor of claim 0 further comprising a storageof determination history of determination outcomes of the processor andthe sensitivity of the detection of motion is additionally determined byan analysis of the determination history by the processor.
 10. Themotion sensor of claim 9, wherein the analysis of the determinationhistory comprises identifying anomalies in the detection of motion. 11.The motion sensor of claim 0, wherein each image frame captured by theNIR low resolution image sensor has two or more regions, and thesensitivity of the detection of motion is additionally determined by inwhich of the two or more regions that the motion is detected.
 12. Themotion sensor of claim 0, wherein the sensitivity of the detection isadjusted based on the current output level of the visible light sensor.13. The motion sensor of claim 0, wherein the sensitivity of thedetection of motion is additionally determined by the location of themotion sensor or the time of day.
 14. A method of detecting motion ofhumans comprising: receiving an amount of visible light detected using avisible light sensor; receiving a plurality of frames from a nearinfrared low resolution image sensor that captures the frames in thenear infrared spectrum; comparing two or more frames of the plurality offrames to detect motion using a processor, wherein the sensitivity ofthe detection of motion is determined by the amount of visible lightdetected by the visible light sensor; and changing the mode of an outputconnected to a light based on the detection of motion.
 15. The method ofclaim 0, wherein the sensitive of the detection of motion is reducedwhen a high amount of visible light is detected.
 16. The method claim 0,wherein the sensitive of the detection of motion is reduced when theamount of visible light detected changes rapidly.
 17. The method ofclaim 0, wherein the comparing of the image frames to detect the motionis performed using an image motion classifier.
 18. The method of claim0, wherein the image motion classifier is trained on images, set ofimages or video offline classified into the modes for the output. 19.The method of claim 0 further comprising maintaining a history ofdetermination outcomes and the sensitivity of the detection of motion isadditionally determined by an analysis of the determination history bythe processor.
 20. The method of any one of claim 0, wherein each imageframes captured by the NIR low resolution image sensor has two or moreregions, and the sensitivity of the detection of motion is additionaldetermined by which of the two or more regions in which the motion isdetected.